package personal.shin.smsviewer;

import android.graphics.Bitmap;
import android.widget.TextView;

public class SMSPage {
	private ProfileImageView ProfileView;
	private TextView OrderView;
	private TextView DateView;
	private TextView SenderView;
	private TextView BodyView;
	private boolean bCurrent;	
	
	public SMSPage(ProfileImageView i, TextView o, TextView d, TextView s, TextView b)
	{
		ProfileView = i;
		OrderView = o;
		DateView = d;
		SenderView = s;
		BodyView = b;
	}
	
	public void setProfileImageColor(String c)
	{
		ProfileView.setEdgeColor(c);
	}
	
	public String toString()
	{
		String full = new String();
		return full;
	}
	
	public void updateView(Bitmap bitmap, String Order, String RDate, String RSender, String RBody)
	{
		if(RSender == null)
		{
			OrderView.setText(null);
			DateView.setText(null);
			SenderView.setText("empty");
			BodyView.setText("....");
			return;		
		}
		ProfileView.setImageBitmap(bitmap);
		OrderView.setText(Order);
		DateView.setText(RDate);
		SenderView.setText(RSender);
		BodyView.setText(RBody);			
	}
	
	public boolean isCurrent(){
		return bCurrent;
	}
	
	public void setCurrent(boolean b)
	{
		bCurrent = b;
	}
}
